package Modelo;

import java.io.PrintStream;

public class PilaPancakes {
	private int[] pancakes;
	private int siguiente;
	private int now;
	private int profundidaL;
	private String result;

	public PilaPancakes(int[] torre, int sus, int act, int niv) {
		this.siguiente = sus;
		this.now = act;
		this.profundidaL = niv;
		this.pancakes = new int[torre.length];
		for (int i = 0; i < torre.length; i++)
			this.pancakes[i] = torre[i];
	}

	public int[] getPancakes() {
		return this.pancakes;
	}

	public int getSucesor() {
		return this.siguiente;
	}

	public int getActual() {
		return this.now;
	}

	public int getNivel() {
		return this.profundidaL;
	}

	public void mostrarTorre1() {
		for (int i = this.pancakes.length - 1; i >= 0; i--)
			System.out.print(this.pancakes[i] + "\n");
	}

	public String mostrarTorre() {
		this.result = "";
		for (int i = this.pancakes.length - 1; i >= 0; i--) {
			this.result = (this.result + this.pancakes[i] + "\n");
		}
		return this.result;
	}

}
